#app {
  // 主体区域
  .main-container {
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: 256px;
    position: relative;
  }
  // 侧边栏展开状态
  .sidebar-container {
    transition: width 0.28s;
    width: 256px !important;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    //reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }
    .el-scrollbar {
      height: 100%;
    }
    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }
    .scrollbar-wrapper {
      overflow-x: hidden !important;
      height: 100%;
      background-color: $menuBg;
    }
    .is-horizontal {
      display: none;
    }
    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }
    .svg-icon {
      margin-right: 16px;
    }
    .el-menu-item {
      padding: 0 24px !important;
      height: 48px;
      line-height: 48px;
    }
    // 第一级的菜单
    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
      background-color: $menuBg;
      .nest-menu {
        .el-submenu {
          .el-submenu__title {
            padding-left: 56px !important;
            height: 52px !important;
            line-height: 52px !important;
            background-color: $subMenuBg !important;
          }
          .el-menu {
            a {
              .el-menu-item {
                padding-left: 72px !important;
              }
            }
          }
        }
      }
      .el-menu-item {
        color: $menu;
        &:hover {
          color: $menuHover !important;
          background-color: $menuBg !important;
        }
        &.is-active {
          color: $menuActive !important;
          background-color: $menuActiveBg !important;
        }
      }
    }

    // 含子级的菜单
    .el-submenu {
      .el-submenu__title{
        padding: 0 24px !important;
        height: 48px;
        line-height: 48px;
        color: $subMenuTitle;
        &:hover {
          color: $subMenuTitleHover !important;
          background-color: $subMenuTitleHoverBg !important;
        }
      }
      &.is-active, &.is-opened {
        &>.el-submenu__title {
          color: $menuHover !important;
          background-color: $menuHoverBg !important;
        }
      }
      a {
        padding: 4px 0 8px;
        background-color: $subMenuBg !important;
        .el-menu-item {
          padding-left: 55px !important;
          height: 40px;
          line-height: 40px;
          min-width: 256px !important;
          background-color: $subMenuBg !important;
          &:hover {
            color: $subMenuHover !important;
            background-color: $subMenuBg !important;
          }
          &.is-active {
            color: $subMenuHover !important;
            background-color: $subMenuHoverBg !important;
          }
        }
      }
    }
  }
 
  .el-menu--collapse .el-menu .el-submenu {
    min-width: 256px !important;
  }

  // 侧边栏收起状态
  .hideSidebar {
    .sidebar-container {
      width: 64px !important;
      .logo {
        padding-left: 13px;
      }
    }
    .main-container {
      margin-left: 64px;
    }
    .submenu-title-noDropdown {
      padding-left: 24px !important;
      position: relative;
      .el-tooltip {
        padding: 0 24px !important;
      }
    }
    .el-submenu {
      overflow: hidden;
      &>.el-submenu__title {
        padding-left: 24px !important;
        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }
    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  //适配移动端
  .mobile {
    .main-container {
      margin-left: 0px;
    }
    .sidebar-container {
      transition: transform .28s;
      width: 256px !important;
    }
    &.hideSidebar {
      .sidebar-container {
        transition-duration: 0.3s;
        transform: translate3d(-256px, 0, 0);
      }
    }
  }
  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// 侧边栏收起后的子菜单样式
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }
}

.el-menu--vertical {
  .el-menu--popup-right-start {
    margin: 0 3px;
  }
  .el-menu--popup {
    background-color: $menuBg !important;
    border-radius: 4px !important;
    .nest-menu {
      padding: 4px 0 8px;
      .el-menu-item {
        height: 40px;
        line-height: 40px;
        color: $menu;
        &:hover {
          color: $menuHover;
          background-color: $menuHoverBg;
        }
        &.is-active {
          color: $subMenuHover;
          background-color: $subMenuHoverBg;
        }
      }
      .el-submenu {
        .el-submenu__title {
          height: 40px;
          line-height: 40px;
          color: $subMenuTitle;
          &:hover {
            color: $subMenuTitleHover;
            background-color: $subMenuTitleHoverBg;
          }
        }
        &.is-active {
          .el-submenu__title {
            color: $subMenuTitleHover;
          }
        }
      }
    }
  }
}
